<%@ page language="java" contentType="text/html; charset=utf-8"  
import="com.brother.model.*,java.util.*" pageEncoding="utf-8"%>
<jsp:useBean id="service" class="com.brother.service.InterestPointService"></jsp:useBean>
<%
com.brother.model.Customer loginUser = (com.brother.model.Customer)session.getAttribute(com.brother.Constants.LOGIN_SESSTION_NAME);
if(loginUser ==null){
	return;
}

List<InterestPoint> points = service.findInterestPointByUser(loginUser.getUserid()+"");

out.print("[");
for(int i =0; i < points.size(); i++){
	out.println("{"); 
	out.print("userId:'"+points.get(i).getUserId()+"',");
	out.print("id:'"+points.get(i).getId()+"',");
	out.print("text:'"+points.get(i).getText().replaceAll("'","\\'")+"',");
	out.print("lat:"+points.get(i).getLat()+",");
	out.print("lng:"+points.get(i).getLng());
	out.print("}");
	if(i < points.size() - 1){
		out.print(",");
	}
}
out.print("]");



%><%
com.brother.database.DataBase.closeThreadConnection();
%>